<?php
// $id=$_GET['id'];
include_once($_SERVER["DOCUMENT_ROOT"].'/home/public/header.php');
include_once($_SERVER["DOCUMENT_ROOT"].'/public/func.php');
$config=include_once($_SERVER["DOCUMENT_ROOT"].'/public/config.php');
$rew=sel($config,'`guanli`');
$re=sell($config,'lan','`guanli`');
$r=sel($config,'`liuyan`','order by addtime desc limit 0,5');

   $p =isset($_GET['p'])?$_GET['p']:'1';
   $num = 5;
   $offset = ($p-1)*$num;
   $rew=sel($config,'guanli', "limit $offset,$num");
?>
<meta charset="utf-8">
<article class="blogs">
<h1 class="t_nav">
<span>我们长路漫漫，只因学无止境。</span>
<a href="/" class="n1">网站首恶</a>
<a href="/" class="n2">留言</a></h1>
<div class="newblog left">

  <?php  
foreach ($rew as $v) {
 echo '<h2>'.$v['title'].'</h2>
    <p class="dateview"> <span> 发布时间：'.$v['addtime'].'</span>
    <span>作者：'.$v['author'].'</span>
    <span>分类：[<a href="/news/life/">'.$v['lan'].'</a>]</span></p>';

  if ($v['tu']!="") {
    echo '<img  style="width: 200px;" src="'.$v['tu'].'">';
  }

     
     echo'<ul class="nlist">
       <p>'.mb_substr(strip_tags($v['content']),0,100,'utf-8').'...</p>
       <a title="/" href="now.php?id='.$v['id'].'" target="_blank" class="readmore">详情信息>></a>
     </ul>
     <p class="dateview" ><a href="/home/new/new.php?id='.$v['id'].'" >评论</a></p>
     <div class="line"></div>'
     ;
}
$id=$v['id'];

?>
 <div class="page"><?php echo page($config,'liuyan');?></div>
  <div class="blank"></div>
    
    
</div>
<aside class="right">
   <div class="rnav">
      <h2>栏目导航</h2>
      <ul>
      <?php
       foreach ($re as $v) {
 echo '<li><a href="shar.php?lan='.$v['lan'].'" target="_blank">'.$v['lan'].'</a></li>';
}
      ?>
     </ul>      
    </div>
<div class="news">
<h3>
      <p>最新<span>留言</span></p>
    </h3>
    <ul class="rank">
    <?php
    foreach ($r as $v) {
      echo '<li><a href="/" title="" target="_blank">'.$v['content'].'</a></li>';
    }


    ?>
    
    </ul>
    
    </div>
    
     <!-- Baidu Button BEGIN -->
    
</aside>
</article>
<?php
include_once($_SERVER["DOCUMENT_ROOT"].'/home/public/footer.php');
?>